﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Net.Mime.MediaTypeNames;

namespace Tools
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            mainPanel.Controls.Clear();//情况Panel
            fileSortRenameForm file = new fileSortRenameForm();
            file.Location = new Point((mainPanel.Width - file.Width) / 2, 0);//子控件位置
            file.Show();//显示控件
            mainPanel.Controls.Add(file);//
        }

        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 显示递增文件重命名界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showIncrementRenameForm(object sender, EventArgs e)
        {
            //添加->用户空间
            mainPanel.Controls.Clear();//情况Panel
            IncrementRenameForm incrementRenameForm = new IncrementRenameForm();
            incrementRenameForm.Location = new Point((mainPanel.Width - incrementRenameForm.Width) / 2, 0);//子控件位置
            incrementRenameForm.Show();//显示控件
            mainPanel.Controls.Add(incrementRenameForm);//控件添加到Panel中
        }

        private void stringSpit_Click(object sender, EventArgs e)
        {
            mainPanel.Controls.Clear();//情况Panel
            StringSpitForm stringSpitForm = new StringSpitForm();
            stringSpitForm.Location = new Point((mainPanel.Width - stringSpitForm.Width) / 2, 0);//子控件位置
            stringSpitForm.Show();//显示控件
            mainPanel.Controls.Add(stringSpitForm);//
        }

        private void 定时关机ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mainPanel.Controls.Clear();//情况Panel
            TimedShutdown timedShutdown = new TimedShutdown();
            timedShutdown.Location = new Point((mainPanel.Width - timedShutdown.Width) / 2, 0);//子控件位置
            timedShutdown.Show();//显示控件
            mainPanel.Controls.Add(timedShutdown);//
        }

        private void 获取图片ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mainPanel.Controls.Clear();//情况Panel
            PdfGetImage pdf = new PdfGetImage();
            pdf.Location = new Point((mainPanel.Width - pdf.Width) / 2, 0);//子控件位置
            pdf.Show();//显示控件
            mainPanel.Controls.Add(pdf);//
        }

        private void 文件排序ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mainPanel.Controls.Clear();//情况Panel
            fileSortRenameForm file = new fileSortRenameForm();
            file.Location = new Point((mainPanel.Width - file.Width) / 2, 0);//子控件位置
            file.Show();//显示控件
            mainPanel.Controls.Add(file);//
        }
    }
}
